#!/bin/bash

home=$(cd $(dirname $0); pwd)

if [ ! -f $home/pid ]; then
  exit 0
fi

pid=$(cat $home/pid)
if [ "$pid" = "" ]; then
  exit 0
fi

pid=`ps -p $pid | grep -v PID | awk '{print $1}'`
echo $pid
